home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / networking / anos / install_dis.lha / AmigaDIS / Clear_Locks < prev    next >
Encoding:
Text File  |  1993-07-13  |  639 b   |  32 lines

  1. /* Cear out any lock files left after a system crash */
  2.  
  3. rqueue = 'slip:' 
  4. findfile = 't:ProcLock'
  5.  
  6. say 'Searching for Lock Files...'
  7.  
  8. /*  Run find to search for the .lck files that NOS leaves lying about.  */
  9.  
  10. address command 'find >' || findfile rqueue '-name *.lck -print'
  11.  
  12. /*  Process the findfile file by file                                   */
  13.  
  14. if ~open( findfile, findfile, 'R' ) then do
  15.     say 'Error Opening Work File. (' || findfile || ')'
  16.     exit 1
  17.  
  18.     end
  19.  
  20. do forever
  21.  
  22.     folder = readln(findfile)
  23.     if eof(findfile) then leave
  24.  
  25.     say 'Deleting ' folder 
  26.     address command 'delete >nil:' folder 
  27.     end          
  28.  
  29. close( findfile )
  30.  
  31. exit
  32.